﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace getPixelInformation
{
    class Pixel
    {
        private int red;
        private int green;
        private int blue;
        private int grayScale;

        public void setRed(int r)
        {
            this.red = r;
        }

        public int getRed()
        {
            return this.red;
        }

        public void setGreen(int g)
        {
            this.green = g;
        }

        public int getGreen()
        {
            return this.green; 
        }

        public void setBlue(int b)
        {
            this.blue = b;
        }

        public int getBlue()
        {
            return this.blue;
        }

        public void setGrayScale(int GS)
        {
            this.grayScale = GS;
        }

        public int getGrayScale()
        {
            return this.grayScale;
        }

        public Pixel()
        {
            this.grayScale = -1;
            this.green = -1;
            this.red = -1;
            this.blue = -1;
        }

        public Pixel(int r, int g, int b, int gs)
        {
            this.blue = b;
            this.red = r;
            this.green = g;
            this.grayScale = gs;
        }


        public Pixel(int r, int g, int b)
        {
            this.blue = b;
            this.red = r;
            this.green = g;
            this.grayScale = (int)(r * 0.299 + g * 0.587 + b * 0.114);
        }

        public Pixel(Pixel p)
        {
            this.grayScale = p.grayScale;
            this.green = p.green;
            this.red = p.red;
            this.blue = p.blue;
        }



    }
}
